package com.my.screenadapter.mInterface;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.my.screenadapter.Base.BaseActivity;
import com.my.screenadapter.R;

import java.util.ServiceLoader;

public class ServiceLoader1Activity extends BaseActivity {

    @Override
    protected void init() {

    }

    @Override
    protected int initLayoutId() {
        return R.layout.activity_service_loader1;
    }

    private static final String TAG = "ServiceLoader1Activity";

    public void startBtn1(View view) {
        Log.i(TAG, "startBtn1: ");
        ServiceLoader<MyServiceLoaderIn> serviceLoader = ServiceLoader.load(MyServiceLoaderIn.class);
        for(MyServiceLoaderIn face:serviceLoader) {
            String s = face.doSome();
            Log.i(TAG, "startBtn1: dosome"+s);
        }
    }
}
